home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
opbonus.arc
/
ALARM.ARC
/
ALARM.PAS
next >
Wrap
Pascal/Delphi Source File
|
1991-03-20
|
2KB
|
67 lines
{$S-,R-,V-,I-,B-,F+}
{$M 4096,0,20480}
{*********************************************************}
{* ALARM.PAS 1.00 *}
{*********************************************************}
{
This program pops up an alarm window at the specified time of day.
Run this program with a time specified on the command line, as in:
ALARM 18:00
or to specify the same time you could do:
ALARM 6:00p
Granted, this is not a particularly useful program. Its purpose is to
illustrate how to write Swappable TSR's that contain interrupt
}
program Alarm;
uses
Dos, {standard DOS/BIOS routines}
OpCrt, {Object Professional CRT unit}
OpString, {Object Professional string handling routines}
OpSwap1,
AlarmM,
{portion always resident}
OpSwap;
var
SaveExitProc : Pointer;
{Note: Must be FAR (see F+ directive above)}
procedure Int1CHandler; External;
procedure EnableTasks; External;
procedure DisableTasks; External;
procedure AlarmCSData; External;
{$L AlarmI}
procedure AlarmIExitProc;
begin
ExitProc := SaveExitProc;
DisableTasks;
end;
procedure InitInterrupts;
begin
SaveExitProc := ExitProc;
ExitProc := @AlarmIExitProc;
EnableTasks;
end;
begin
{Set up start up and shutdown procedures.}
ShutDownProc := DisableTasks;
StartUpProc := InitInterrupts;
AlarmData := @AlarmCSData;
InitAlarm; {init popups and go resident}
end.